package com.lenovo.order_service.utils;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.List;

public class PageBeanUtil<T> implements Serializable {
    private static final long serialVersionUID = -7839750622471052733L;
    private Integer pageIndex;
    private Integer pageSize;
    private Integer pageCount;
    @JsonFormat(
            with = {JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY}
    )
    private List<T> data;

    public PageBeanUtil() {
    }

    public Integer getPageIndex() {
        return this.pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageCount() {
        return this.pageCount;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }

    public List<T> getData() {
        return this.data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
